
// 公共头部
import myHeader from "/pages/headerfoot/pages/header.vue";
//公共底部
import Tabbar from '/pages/headerfoot/pages/hitgamefooter.vue'
//打帮赛方法
import hitmatchcommon from '@/common/hitmatchcommon.js';
//cache缓存
import Cache from '@/utils/cache.js';
//基础
import Base from '@/common/base.js'

export default {
	 components: {myHeader,Tabbar},
	data() {
		return {
		    make_id:'',  //赛事ID
			list:[],//列表
			Base:Base,//基础
		}
	},
	onLoad(options = '') {
		var that = this;
		if (options.id) {
			that.make_id = options.id;
			Cache.set('project_make_id',options.id);
		}
		that.getMakeProjectListLib();//获取项目
		
		
	},
	methods: {
		//获取项目  		
		
		async getMakeProjectListLib() {
			var that = this;
			var data = {};
			data['make_id']=that.make_id;
			data['make_user_id']=Cache.get('user_id');
			hitmatchcommon.getMakeProjectListLibMethod(data).then(res => {
				if (res) {
					that.list = res; //获取项目
				}
			});
		},
		//开始游戏
		begingame(url='',id=''){
			Cache.set('project_id',id);//项目ID
			uni.navigateTo({
				url:url,
			})
		},
	}
}



